package xcmg.device.dao.mapper.safetyStock;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.safetyStock.MaterialsSafetyStock;

/**
 * @author wangyong
 */
@Mapper
public interface MaterialsSafetyStockMapper {

  /**
   * list
   * @param materialsSafetyStock
   * @return
   */
  List<MaterialsSafetyStock> list(MaterialsSafetyStock materialsSafetyStock);

  /**
   * 添加
   *
   * @param materialsSafetyStock
   * @return
   */
  Integer insert(MaterialsSafetyStock materialsSafetyStock);

  /**
   * 修改
   *
   * @param materialsSafetyStock
   * @return
   */
  Integer update(MaterialsSafetyStock materialsSafetyStock);


  /**
   * 获取零件安全库存信息
   *
   * @param orgId
   * @param materialsNo
   * @return
   */
  MaterialsSafetyStock getByMaterialsNo(@Param("orgId") String orgId, @Param("materialsNo") String materialsNo);

  int delete(@Param("materialsNo") String materialsNo, @Param("orgId") String orgId);

}
